<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
    <meta charset="UTF-8">
        <style>
            .input-mall {
                border: 1px #b1b1b1 solid;
                width: 80px;
                line-height: 20px;
                padding: 1px 5px;
                min-width: 80px;
                color: #333;
            }
        </style>
    </head>
    <jsp:include page="/WEB-INF/jsp/header.jsp"/>
<body>
<div class="body-main">
    <form id="flowCreate" action="">
        <table class="add-table form-table">
            <tr>
                <input type="hidden" value="${talent.id}" name="id">
            </tr>
            <tr>
                <th><span class="required">姓名：</span></th>
                <td>
                    <input type="text" class="input-style" name="talentName" value="${talent.talentName}"/>
                </td>
            </tr>
            <tr>
                <th><span>性别：</span></th>
                <td>
                    <div class="layui-input-inline">
                        <select class="select-style" id="talentSex" name="talentSex"
                                style="width:240px">
                            <option value="">请选择</option>
                            <c:forEach var="s" items="${sex}">
                                <option value="${s.code}" <c:if test="${talent.talentSex == s.code}">selected</c:if>>${s.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <th><span>年龄：</span></th>
                <td>
                    <input type="number" class="input-style" name="talentAge" value="${talent.talentAge}" id="talentAge"/>
                </td>
            </tr>
            <tr>
                <th><span>学历：</span></th>
                <td>
                    <div class="layui-input-inline">
                        <select name="education" id="education" class="select-style">
                            <option value="">请选择</option>
                            <c:forEach var="ed" items="${talentEdcation}">
                                <option value="${ed.code}" <c:if test="${talent.education == ed.code}">selected</c:if>>${ed.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <th><span>毕业院校：</span></th>
                <td>
                    <input type="text" class="input-style" name="school" value="${talent.school}"/>
                </td>
            </tr>
            <tr>
                <th><span>专业：</span></th>
                <td>
                    <input type="text" class="input-style" name="major" value="${talent.major}"/>
                </td>
            </tr>
            <tr>
                <th><span>当前职位：</span></th>
                <td>
                    <div class="tree-select-warp">
                        <input type="text" class="input-style" id="currentPosition"  name="currentPosition" data-id="${talent.currentPosition}">
                    </div>
                </td>
            </tr>
            <tr>
                <th><span>在职公司：</span></th>
                <td>
                    <div class="layui-input-inline">
                        <input type="text" class="input-style" id="currentCompany"  name="currentCompany" value="${talent.currentCompany}"/>
                    </div>
                </td>
            </tr>
            <tr>
                <th><span>所持证书：</span></th>
                <td>
                    <label class="input-unit">
                        <input type="text" class="input-style" name="certificate" id="certificate" value="${talent.certificate}" />
                    </label>
                </td>
            </tr>
            <tr>
                <th><span>目标行业：</span></th>
                <td>
                    <div class="tree-select-warp">
                        <input type="text" class="input-style" id="targetIndustry" readonly="" name="targetIndustry" data-id="${talent.targetIndustry}">
                    </div>
                </td>
            </tr>
            <tr>
                <th><span>期望薪资：</span></th>
                <td>
                    <div class="layui-input-inline">
                    <input type="text" class="input-mall" name="salaryMin"  id="salaryMin" value="${talent.salaryMin}"/> K &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;—&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <input type="text" class="input-mall" name="salaryMax"  id="salaryMax" value="${talent.salaryMax}"/> K
                    </div>
                </td>
            </tr>
            <tr>
                <th><span>求职地区：</span></th>
                <td>

                    <div class="tree-select-warp">
                        <input type="text" class="input-style" id="jobArea" readonly="" name="jobArea" data-id="${talent.jobArea}">
                    </div>
                            <%--<div class="layui-input-inline tree-select-warp">--%>
                                <%--&lt;%&ndash;<select class="select-style" id="jobArea" name="jobArea">&ndash;%&gt;--%>
                                <%--&lt;%&ndash;</select>&ndash;%&gt;--%>
                                    <%--<input type="text" class="input-style" id="jobArea" readonly="" data-id="${talent.jobArea}"name="jobArea">--%>
                            <%--</div>--%>


                </td>
            </tr>
            <tr>
                <th><span>求职状态：</span></th>
                <td>
                    <div class="layui-input-inline">
                        <select class="select-style" name="jobStatus" id="jobStatus">
                            <option value="">请选择</option>
                            <c:forEach var="js" items="${jobStatus}">
                                <option value="${js.code}"<c:if test="${talent.jobStatus == js.code}">selected</c:if>>${js.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <th><span class="required">联系电话：</span></th>
                <td>
                    <label class="input-unit">
                        <input type="text" class="input-style" name="talentPhone" id="talentPhone" value="${talent.talentPhone}"/>
                        <input type="hidden" class="input-style" name="oldPhone" id="oldPhone" value="${talent.talentPhone}"/>
                    </label>
                </td>
            </tr>
            </tr>
            <tr>
                <th><span>上传附件：</span></th>
                <td>
                    <ul class="data-warp">
                        <li>
                            <a href="javascript:void(0)" class="upload-button" id="upload"></a>
                            <input class="layui-upload-file" type="file" name="file" multiple="" id="annexUpload" data-type="talent" data-fileid="${talent.id}"  is-remove="1" is-magnify="0" load-file="1">
                            <p>上传附件</p>
                        </li>
                    </ul>
                </td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript"
        src="${basePath}/static/js/zzsc/common/dgg.verify.js?v=${version}"></script>
<script src="${rootUrl}/static/js/zzsc/common/files/annex.js?v=${version}" type="text/javascript" charset="utf-8"></script>

<script>
    $(function(){
        $('.tree-select.jobArea').remove();
        $('.tree-select.targetIndustry').remove();
        $('#jobArea').selectTree({
            check:true,   //默认为false，单选；设置为 true ，为多选
            search: true,
            close:true,
            chkboxType: { "Y" : "s", "N" : "s" },
            code:"name",
            url:cmsBaseUrl +  "/api/cms/tree_book/v1/get_tree_book_list.do?code=2147483647&type=2&level=1",
            idKey: "id",//指定id
            pIdKey: "pid",//指定pId
            dataFilter: function (treeId, parentNode, responseData) {
                return responseData.data;
            }

        });
        $('#currentPosition').selectTree({
            check:false,   //默认为false，单选；设置为 true ，为多选
            close:true,
            search: true,
            code:"name",
            url:cmsBaseUrl +  "/api/cms/tree_book/v1/get_tree_book_list.do?code=LTZW&type=2&level=2",
            idKey: "id",//指定id
            pIdKey: "pid",//指定pId
            idName: 'currentPosition1',
            dataFilter: function (treeId, parentNode, responseData) {
                return responseData.data;
            }

        });
        $('#targetIndustry').selectTree({
            check:true,   //默认为false，单选；设置为 true ，为多选
            close:true,
            search: true,
            code:"name",
            chkboxType: { "Y" : "s", "N" : "s" },
            url:cmsBaseUrl +  "/api/cms/tree_book/v1/get_tree_book_list.do?code=HYFL&type=2&level=2",
            idKey: "id",//指定id
            pIdKey: "pid",//指定pId
            idName: 'targetIndustry1',
            dataFilter: function (treeId, parentNode, responseData) {
                return responseData.data;
            }

        });
    });
</script>
</body>
</html>
